package com.lianxi.Courses.entity;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Comment {

    private String nickname;

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    private String createStartDate;
    private String createEndDate;

    public String getCreateStartDate() {
        return createStartDate;
    }

    public void setCreateStartDate(String createStartDate) {
        this.createStartDate = createStartDate;
    }

    public String getCreateEndDate() {
        return createEndDate;
    }

    public void setCreateEndDate(String createEndDate) {
        this.createEndDate = createEndDate;
    }

    //赞的个数
    private int like;

    public int getLike() {
        return like;
    }

    public void setLike(int like) {
        this.like = like;
    }

    private User user;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_comment.id
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    private Integer id;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_comment.context
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    private String context;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_comment.create_date
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    private Date createDate;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_comment.user_id
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    private Integer userId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_comment.resource_id
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    private Integer resourceId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_comment.status
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    private Integer status;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_comment.id
     *
     * @return the value of t_comment.id
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public Integer getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_comment.id
     *
     * @param id the value for t_comment.id
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_comment.context
     *
     * @return the value of t_comment.context
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public String getContext() {
        return context;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_comment.context
     *
     * @param context the value for t_comment.context
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public void setContext(String context) {
        this.context = context == null ? null : context.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_comment.create_date
     *
     * @return the value of t_comment.create_date
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public String getCreateDate() {
        if (createDate == null) return null;
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return dateFormat.format(createDate);
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_comment.create_date
     *
     * @param createDate the value for t_comment.create_date
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_comment.user_id
     *
     * @return the value of t_comment.user_id
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_comment.user_id
     *
     * @param userId the value for t_comment.user_id
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_comment.resource_id
     *
     * @return the value of t_comment.resource_id
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public Integer getResourceId() {
        return resourceId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_comment.resource_id
     *
     * @param resourceId the value for t_comment.resource_id
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public void setResourceId(Integer resourceId) {
        this.resourceId = resourceId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_comment.status
     *
     * @return the value of t_comment.status
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_comment.status
     *
     * @param status the value for t_comment.status
     *
     * @mbggenerated Mon Oct 13 09:10:57 CST 2025
     */
    public void setStatus(Integer status) {
        this.status = status;
    }
}